﻿
#region Imports...
using System;
using System.Web.UI.WebControls;
using InvoiceChecking.Web.UI;
#endregion

public partial class PaymentTypeEdit : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{		
		FormUtil.RedirectAfterInsertUpdate(FormView1, "PaymentTypeEdit.aspx?{0}", PaymentTypeDataSource);
		FormUtil.RedirectAfterAddNew(FormView1, "PaymentTypeEdit.aspx");
		FormUtil.RedirectAfterCancel(FormView1, "PaymentType.aspx");
		FormUtil.SetDefaultMode(FormView1, "PaymentTypeId");
	}
    protected void FormView1_Load(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.Edit)
        {
            var dataPaymentTypeCode = (TextBox)FormView1.FindControl("dataPaymentTypeCode");
            dataPaymentTypeCode.Enabled = false;
            var dataAccountNumber = (TextBox)FormView1.FindControl("dataAccountNumber");
            dataAccountNumber.Enabled = false;
            var dataCurrency = (EntityDropDownList)FormView1.FindControl("dataCurrency");
            dataCurrency.Enabled = false;
        }
    }
}


